package edu.xmut.yuepai.client;

import edu.xmut.yuepai.model.entity.SysPicture;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("service-sys")
public interface SysPictureFeignClient {
    @GetMapping("/sys-picture/blog/{blogId}")
    List<SysPicture> getBlogPictureByBlogId(@PathVariable("blogId") Long id);

    @PostMapping("/sys-picture/save")
    Boolean savePicture(SysPicture sysPicture);

    @PostMapping("/sys-picture/save-batch/blog")
    Long saveBatchBlogPicture(@RequestParam("blogId") Long blogId, @RequestBody List<String> imageIds);

    @GetMapping("/sys-picture/blog/cover/{id}")
    SysPicture getBlogCover(@PathVariable("id") String id);

    @PostMapping("/sys-picture/save-batch/yuepai")
    Long saveBatchYuePaiPicture(@RequestParam("yuepaiId") Long yuepaiId, @RequestBody List<String> imageIds);

}
